﻿using UnityEngine;
using System.Collections;

public enum ItemType
{
	MANA,
	HEALTH
};   // 枚举后面是跟分号的


/// <summary>
/// 此脚本挂在物体上，也是为了给物体关联对应的小图片
/// </summary>
public class Item : MonoBehaviour
{

	public ItemType type;

	public Sprite spriteNeutral;

	public Sprite spriteHighlighted;

	public int maxSize;

	public void Use ()
	{
		switch (type) {
		case ItemType.MANA:
			Debug.Log (" I just used a mana potion");
			break;
		case ItemType.HEALTH:
			Debug.Log (" I just used a health potion");
			break;
		default:
			break;
		}
	}

	// Use this for initialization
	void Start ()
	{

	}

	// Update is called once per frame
	void Update ()
	{

	}
}
